import { useState, useEffect } from "react"
import { fetchChannleApi, ChannelItem } from "../apis/list";
export function useTabls() {
    const [channleList, setChannleList] = useState<ChannelItem[]>([])
    useEffect(() => {
        const getChannels = async () => {
            const res = await fetchChannleApi()
            setChannleList(res.data.data.channels)
        }
        getChannels();
    }, [])
    return {
        channleList
    }

}